﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Orderr
{
    [Serializable]
    public class OrderDetails
    {
        public Good good;
        public int nums;
        public OrderDetails(Good goo, int num)
        {
            good = goo; nums = num;
        }
        public OrderDetails()
        {

        }
        public override bool Equals(object obj)
        {
            OrderDetails ob = obj as OrderDetails;
            return good == ob.good && nums == ob.nums;
        }
        public override int GetHashCode()
        {
            return good.GetHashCode() + nums;
        }
        public override string ToString()
        {
            return good.ToString() + " " + nums + "件\n";
        }

    }
}
